.container{
  width: 500px;
  margin: 0 auto;
  height: 400px;
  border: solid 1px #ddd;
  padding: 20px;
}

.container .msg-item{
  padding: 10px;
  background: #f1f2f2;
  border-radius: 8px;
  margin-bottom: 10px;
}

.wrapper::after{
  content: '';
  display: block;
  clear: both;
}

.container .msg-item.right{
  float: right;
  background: #5d5cde;
  color: white;
}

.container .msg-item.left{
  float: left;

}
